package com.xuecheng.api.learning;

import com.xuecheng.api.learning.model.dto.CourseRecordDTO;
import com.xuecheng.api.learning.model.vo.CourseRecordVo;
import com.xuecheng.api.media.model.ResourceUrlModel;
import com.xuecheng.common.domain.page.PageRequestParams;
import com.xuecheng.common.domain.page.PageVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

/**
 * Created on 2021/04/15/17:43 周四
 *
 * @author Lantin
 */
@Api(tags = "学习中心-查询课程记录接口api")
public interface CourseRecordApi {


    @ApiOperation("跟布局课程发布id查询用户的课程学习记录")
    @ApiImplicitParam(name = "coursePubId", value = "课程发布id", required = true, dataType = "Long", paramType = "path")
    CourseRecordDTO getCourseRecordByCoursePubId(Long coursePubId);

    @ApiOperation("分页-条件查询用户的全部课程学习记录")
    @ApiImplicitParam(name = "params", value = "分页查询参数", required = true, dataType = "PageRequestParams", paramType = "query")
    PageVO<CourseRecordDTO> queryCourseRecordList(PageRequestParams params);

    @ApiOperation("获取录播课程的视频播放url")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "coursePubId", value = "课程发布Id", dataType = "long", required = true, paramType = "query", example = "1"),
            @ApiImplicitParam(name = "teachplanId", value = "课程大纲Id", dataType = "long", required = true, paramType = "query", example = "1"),
            @ApiImplicitParam(name = "mediaId", value = "媒资Id", dataType = "long", required = true, paramType = "query", example = "1")
    })
    ResourceUrlModel getResourceUrl(Long coursePubId,
                                    Long teachplanId,
                                    Long mediaId);

    @ApiOperation("保存用户的课程学习进度")
    @ApiImplicitParam(name = "recordVo",value = "")
    CourseRecordDTO updateCourseRecord(CourseRecordVo recordVo);

}
